<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-contract-add">
        <div class="form-group">
            <label class="col-sm-3 control-label">合同编号：</label>
            <div class="col-sm-8">
                <input name="contractNum" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">合同名称：</label>
            <div class="col-sm-8">
                <input name="contractName" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">销售订单编号：</label>
            <div class="col-sm-8">
                <select name="purchaseId" class="form-control m-b">
                    <option selected hidden value="">-请选择销售编号-</option>
                    <option th:each="dict : ${tSales}" th:value="${dict.salesId}"  th:text="${dict.salesNum}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">卖方：</label>
            <div class="col-sm-8">
                <select name="contractSeller" class="form-control m-b">
                    <option selected hidden value="">-请选择销售人员-</option>
                    <option th:each="dict : ${sysUsers}" th:value="${dict.userName}"  th:text="${dict.userName}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">买方：</label>
            <div class="col-sm-8">
                <select name="contractBuyer" class="form-control m-b">
                    <option selected hidden value="">-请选择购买人员-</option>
                    <option th:each="dict : ${tPurchases}" th:value="${dict.purchaseName}"  th:text="${dict.purchaseName}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">卖方身份证号：</label>
            <div class="col-sm-8">
                <input name="contractSellerCid" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">买方身份证号：</label>
            <div class="col-sm-8">
                <input name="contractBuyerCid" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">房子位置：</label>
            <div class="col-sm-8">
                <input name="contractPosition" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">房子面积：</label>
            <div class="col-sm-8">
                <input name="contractArea" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">每平方米价格：</label>
            <div class="col-sm-8">
                <input name="contractPriceSquare" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">大写价格：</label>
            <div class="col-sm-8">
                <input name="contractCapitalPrice" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">小写价格：</label>
            <div class="col-sm-8">
                <input name="contractPriceInFigures" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">房产名字更改时间：</label>
            <div class="col-sm-8">
                <input name="contractPriceName" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">违约金：</label>
            <div class="col-sm-8">
                <input name="contractBreachOfContract" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">其它约定：</label>
            <div class="col-sm-8">
                <input name="contractOther" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">卖方地址：</label>
            <div class="col-sm-8">
                <input name="contractSellerAddres" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">卖方手机号：</label>
            <div class="col-sm-8">
                <input name="contractSellerPhone" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">买方地址：</label>
            <div class="col-sm-8">
                <input name="contractBuyerAddres" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">买方手机号：</label>
            <div class="col-sm-8">
                <input name="contractBuyerPhone" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">签订时间：</label>
            <div class="col-sm-8">
                <div class="input-group date">
                    <input name="contractDate" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">付款时间（几日内）：</label>
            <div class="col-sm-8">
                    <input name="contractPricePayDate" class="form-control"  type="text">
            </div>
        </div>

    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
    var prefix = ctx + "system/contract"
    $("#form-contract-add").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/add", $('#form-contract-add').serialize());
        }
    }

    $("input[name='contractDate']").datetimepicker({
        format: "yyyy-mm-dd HH:mm:ss",
        minView: "month",
        autoclose: true
    });

</script>
</body>
</html>